<template>
  <view class="mb-4" v-if="props">
    <van-cell-group inset>
      <van-cell use-label-slot>
        <view slot="title" class="c-black font-bold">分账明细</view>
      </van-cell>
      <van-cell title="用户名称" :value="props.info.userName" />
      <van-cell title="用户收益" :value="'￥' + props.info.userGain" />
      <van-cell title="用户分账金额" v-if="props.info.userSplitAmount" :value="'￥' + props.info.userSplitAmount" />
      <van-cell title="上级公司名称" :value="props.info.companyBusinessName" />
      <van-cell title="上级公司分账金额" :value="'￥' + props.info.userGain" />
      <van-cell title="分账来源类型" :value="props.info.splitType === 1 ? '自订单' : '补贴订单'" />
      <van-cell title="分账状态">
        <view :style="{ color: filters.splitStateFillter(props.info.splitState)!.color }">
          {{ filters.splitStateFillter(props.info.splitState)!.value }}
        </view>
      </van-cell>
      <van-cell title="分账日期" :value="props.info.splitDate" />
    </van-cell-group>
  </view>
</template>

<script setup lang="ts">
import filters from '@/utils/filters';
interface IProps {
  info: IMoneyManagementList;
}
const props = defineProps<IProps>();
</script>
